<style type="text/css">
  .panel {
      margin-bottom: 0px;
      background-color: #fff;
      border: 1px solid transparent;
      border-radius: 4px;
      -webkit-box-shadow: 0 1px 1px rgba(0, 0, 0, .05);
      box-shadow: 0 1px 1px rgba(0, 0, 0, .05);
  }
  .modal-content {
    position: relative;
    background-color: #fff;
    -webkit-background-clip: padding-box;
    background-clip: padding-box;
    border: 0px solid #999;
    border: 0px solid rgb(94, 98, 113);
    border-radius: 6px;
    outline: 0;
    -webkit-box-shadow: 0 3px 9px rgba(0, 0, 0, .5);
    box-shadow: 0 3px 9px rgba(0, 0, 0, .5);
}
</style>
<div class="col-sm-12 mt20" ng-keyup="myKeyup($event)">
<div class="panel panel-default">
<div class="panel-body">
<div class="col-sm-12">
    <div class="row ">
        <div class="col-sm-offset-10 col-sm-2">
            <button class="btn btn-block btn-info" ng-click="add()">添加奖品</button> 
        </div>
        

    </div>

</div>
</div>
</div>
<!-- searchArea -->
<div class="panel panel-default">
    <div class="panel-body">
        <table class="table table-condensed table-hover table-bordered">
            <thead>
                <tr>
                    <th class="col-md-1 text-center" style="width:20%">销售品名称</th>
                    <th class="col-md-2 text-center">副标题</th>
                    <th class="col-md-2 text-center">奖品有效期</th>
                    <th class="col-md-1 text-center">市场价</th>
                    <th class="col-md-1 text-center">目标价</th>
                    <th class="col-md-1 text-center">库存</th>
                    <th class="col-md-1 text-center">实际卖出数量</th>
                    <th class="col-md-1 text-center">奖品状态</th>
                    <th class="col-md-1 text-center">开启/关闭</th>        
                    <th class="col-md-3 text-center">操作</th>
                </tr>
            </thead>
            <tbody>
                <tr ng-repeat="obj in objs">
                    <td class="text-center">{{obj.sale_name}}</td>
                    <td class="text-center">{{obj.subtitle}}</td>
                    <td class="text-center">{{obj.start_time}}
                        <br>{{obj.end_time}}
                    </td>
                    <td class="text-center">{{obj.market_price / 100}}</td>
                    <td class="text-center">{{obj.price / 100}}</td>
                    <td class="text-center">{{obj.num}}</td>
                    <td class="text-center">{{obj.sale_num}}</td>
                    <td class="text-center">
                        <p class="" ng-show="obj.state == '0'">未开启</p>
                        <p class="" ng-show="obj.state == '1'">已开启</p>
                        <p class="" ng-show="obj.state == '2'">已结束</p>                        
                    </td>        
                    <td class="">
                        <label class="i-switch bg-success" ng-init="obj.isSelected" style="margin-left:25%">
                            <input type="checkbox" ng-model="obj.isSelected" ng-change="onChange(obj.isSelected, obj.id, obj.state)">
                            <i></i>
                        </label>
                    </td>                              
                    <td class="text-center">
                        <a ng-click="edit(obj.id)" class="btn btn-info btn-xs">编辑</a>
                        <a ng-click="seeprizeuser(obj.id)" class="btn btn-success btn-xs">参与用户</a> 
                        <a ng-click="getprizeuser(obj.id)" class="btn btn-primary btn-xs">获奖用户</a> 
                        <a ng-click="notice(obj)" ng-show="obj.notice_status=='0'" class="btn btn-primary btn-xs">活动结束通知</a>                             
                        <a ng-click="addad(obj.id)" class="btn btn-warning btn-xs">奖品广告</a>                             
                        <a ng-click="delete(obj.id)" class="btn btn-danger btn-xs">删除</a>
                    </td>
                </tr>
            </tbody>
        </table>
        <div class="text-right">
             <pagination total-items="bigTotalItems" ng-model="bigCurrentPage" ng-change="getlist()" previous-text="上一页" next-text="下一页"
                first-text="首页" last-text="尾页" max-size="maxSize" boundary-links="true" rotate="false" items-per-page="itemsPerPage"
                class="m-t-none m-b">
            </pagination>
        </div>
    </div>
</div>

</div>
        
